package app;

import javax.imageio.ImageIO;
import javax.swing.*;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;

public class ImageTest {
    public static void main(String[] args) {
        try {
            BufferedImage img = ImageIO.read(new File("JavaCourseDesign/src/main/resources/logo/hayden.png"));
            if (img!= null) {
                JLabel label = new JLabel(new ImageIcon(img));
                JFrame frame = new JFrame();
                frame.add(label);
                frame.setSize(500, 500);
                frame.setVisible(true);
            } else {
                System.out.println("Image is null.");
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}